<?php
use app\common\model\User;
?>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>{if $title}{$title}-{/if}微信后台管理</title>
  <base href="{$Think.const.SITE_URL}/"></base>
  <script type="text/javascript">
    var siteUrl = "{$Think.const.SITE_URL}";
    var uploadUrl = "{$Think.const.UPLOAD_URL}";
    var isAdmin = 1;
  </script>
  {/*var_dump($module)*/}
  {css href="./static/css/base.css" /}
  {css href="./static/css/admin/admin.css" /}
  <link rel="stylesheet" href="{__STATIC_PATH}lib/layui-v2.5.4/css/layui.css" media="all">

  {if in_array($module, explode(',', ',autoreply,appmsg,appmenu,appmenu_stat,key_stat,message,user'))}
  {css href="./static/css/admin/weixin.css"}
  {/if}

  {js href='./static/js/jquery-1.7.1.min.js' /}
  {js href='./static/js/jqueryui/1.8.11/jquery-ui.js' /}
  {js href="./static/js/common.js" /}
  {js href='./static/js/admin/admin.js' /}
  {js href='./static/js/qDialog.js' /}
  {js href="./static/js/zclip/jquery.zclip.min.js"}
  {js href="./static/js/zclip/ZeroClipboard.js"}
  <link rel="shortcut icon" href="./favicon.ico">
  <script src="{__STATIC_PATH}lib/layui-v2.5.4/layui.js?v=1.0.4" charset="utf-8"></script>
  <script src="{__STATIC_PATH}js/lay-config.js?v=1.0.4" charset="utf-8"></script>
  <link rel="stylesheet" href="{__STATIC_PATH}/css/admin/weiboface.css" type="text/css" />
  <script type="text/javascript" src="{__STATIC_PATH}/js/weiboface.js"></script>
  <!--[if IE 6]>
  <script src="./static/js/DD_belatedPNG_0.0.8a-min.js"></script>
  <script>
    DD_belatedPNG.fix('.logo a,.n-icon');
  </script>
  <![endif]-->
  <script>
  $(function(){
    // 页面高度
    var windowHeight = $(window).height();
    var domHeight = $(document).height();
    if (domHeight > windowHeight) {
      windowHeight = domHeight;
    }
    if ($(".inner-center").height() < windowHeight - 66) {
      $(".inner-center").css('min-height', windowHeight - 66);
      //$('body').css('overflow', 'hidden');
    }
    
    // 用户设置浮层
    $(".js_userSetBtn").click(function(e){
     e.preventDefault();
     e.stopPropagation();
     
     $(".js_cardSetBox").addClass('hidden');
     if ($(".js_userSetBox").hasClass('hidden')) {
       $(".js_userSetBox").removeClass('hidden');
     } else {
       $(".js_userSetBox").addClass('hidden');
     }
    });

      // 公众号下拉浮层
      $(".js_cardSetBtn").click(function(e){
          e.preventDefault();
          e.stopPropagation();

          $(".js_userSetBox").addClass('hidden');
          if ($(".js_cardSetBox").hasClass('hidden')) {
              $(".js_cardSetBox").removeClass('hidden');
          } else {
              $(".js_cardSetBox").addClass('hidden');
          }
      });

      // 表情初始化
      weiboFaceInit({
          //emotionUrl: "javascript:;",
          data: {:config('emotion.weixin_emotions')}
      });
  });
  </script>
</head>
<body>

<div id="wrap">
  <div class="header">
    <div class="htop clearfix">
      {/*LOGO*/}
      <h1 class="logo left" style="width:300px;"><a href="{:url('admin')}">微信后台管理 [{$open_card_info['title']}] </h1>
      {if $user_id > 0}
        {/*个人信息*/}
        <div class="infotop">
          <a href="javascript:void(0);" class="userpic"></a>
          <span class="username-right js_userSetBtn">
            <a href="javascript:;" class="username">{:User::display_name($user_id)}</a>
            <span class="arrowtop">
              <i></i>
            </span>
          </span>
          <div class="poptop poptop-user js_userSetBox hidden" style="background:white;">
            <em>◆</em>
            <ul>
              {/*<li><a href="javascript:;" class="js_userSetting">修改密码</a></li>*/}
              <li><a href="{:url('home')}">回前台</a></li>
              <li><a href="{:url('/admin/logout/index')}">退出</a></li>
            </ul>
          </div>
        </div>
      {else}
        <div class="htop-login right">
          <a href="{:url('admin')}">登录</a>
          <a href="{:url('user/register')}">注册</a>
        </div>
      {/if}
    </div>
  </div>
  <div class="container clearfix">
    {include file="../app/common/admin/lib/sidebar.html" model=$model}
    <div class="center">
      <div class="inner-center">